/**
 * @author Tobias Boehm
 *
 * 16.05.2011
 */
package org.anddev.andengine.extension.tbsengine.menu.view;

import java.util.List;

import org.anddev.andengine.extension.tbsengine.map.AbsMapOverview;
import org.anddev.andengine.extension.tbsengine.match.AbsServerMatchPreparation.MatchPreparationState;
import org.anddev.andengine.extension.tbsengine.match.playerslot.AbsClientPlayerSlot;
import org.anddev.andengine.extension.tbsengine.menu.activity.AbsPrepareMatchActivity;
import org.anddev.andengine.extension.tbsengine.message.server.ServerChatMessageForwardMessage;
import org.anddev.andengine.extension.tbsengine.message.server.ServerMatchPlayerJoinedLeftAnnouncementMessage.PlayerAnnouncementType;
import org.anddev.andengine.extension.tbsengine.message.server.preparematch.AbsServerMatchpreparationJoinRequestReplyMessage;
import org.anddev.andengine.extension.tbsengine.message.server.preparematch.ServerMatchpreparationSlotChangeRequestReplyMessage.SlotChangeReplyReason;
import org.anddev.andengine.extension.tbsengine.message.server.preparematch.ServerMatchpreprataionStartRequestReplyMessage.StartReplyReason;
import org.anddev.andengine.extension.tbsengine.player.BasePlayer;

/**
 * This interface serves a method which will be called by an implementation of
 * {@link AbsPrepareMatchActivity}.
 * <p>
 * You should implement this interface inside a view which you will use for your
 * PrepAreMatchActivity.
 * 
 * 
 * @author Tobias Boehm
 *
 * @param <PlayerSlotClass> - Your implementation of {@link AbsClientPlayerSlot}
 * @param <MapOverviewClass> - Your implementation of {@link AbsMapOverview}
 */
public interface IPrepareMatchView<PlayerSlotClass extends AbsClientPlayerSlot,
								   MapOverviewClass extends AbsMapOverview> {

	public void setMap(final MapOverviewClass pMapOverview);
	
	public void setPlayerSlotRows(List<PlayerSlotClass> pPlayerSlotRows);
	
	public void addChatMessage(final ServerChatMessageForwardMessage pChatMessage);
	
	public void onStartConnectingToGameServer();
	
	public void onGameServerDisconnected();
	
	public void onGameServerConnected();
	
	public void onGameServerNotReachable(final String pDestinationIP, final int pDestinationPort);
	
	public void onPlayerJoinedLeftBanned(final BasePlayer pPlayer, final PlayerAnnouncementType pAnnouncementType);
	
	public void onMatchStateChanged(final MatchPreparationState pMatchState);
	
	public void onMatchJoinRequestReply(final AbsServerMatchpreparationJoinRequestReplyMessage pServerMessage);
	
	public void onSlotChangeRequestReply(final boolean pChangePermitted, final SlotChangeReplyReason pSlotChangeReplyReason);
	
	public void onServerMatchStartRequestReply(final boolean pChangePermitted, final StartReplyReason pReason);
}
